#ifndef CAPTURE_CONTROLLER_H
#define CAPTURE_CONTROLLER_H

#include <stdbool.h>

/**
 * @brief Initialize the capture controller
 * 
 * Sets up frame storage, connects to the robot arm,
 * and configures signal handlers
 */
void init_capture_controller(void);

/**
 * @brief Record a frame with its timestamp
 * 
 * @param index The frame index to record
 */
void record_frame(unsigned int index);

/**
 * @brief Check if capture should be stopped
 * 
 * @return true if capture should stop, false to continue
 */
bool should_stop_capture(void);

/**
 * @brief Clean up resources and save data
 * 
 * Call this function before program exit to save motion
 * data to JSON and free allocated resources
 */
void cleanup_capture_data(void);

#endif /* CAPTURE_CONTROLLER_H */ 